mk=angular.module("app",[]);
mk.controller("tt",["$scope",function($scope){
	dataStr=localStorage.getItem("ly");
	if(dataStr){
		dataObj=JSON.parse(dataStr);
		$scope.zhi=dataObj.info
	}else{
		localStorage.setItem("ly",'{"info":[]}');
	}
	    
	//提交    
	$scope.bb=function(){
		dataStr=localStorage.getItem("ly");
		dataObj=JSON.parse(dataStr);
		dataObj.info.push({"xm":$scope.xm,"je":$scope.je});
		$scope.zhi=dataObj.info;   
		dataStr=JSON.stringify(dataObj);
		localStorage.setItem("ly",dataStr)
		$(".input").val("")              
	}
	$scope.sc=function(index){
		dataObj=JSON.parse(dataStr);  
		dataObj.info.splice(index,1)
		$scope.zhi=dataObj.info
		dataStr=JSON.stringify(dataObj)
		localStorage.setItem("ly",dataStr)
	}
}])
mk.controller("cc",["$scope",function($scope){
	dataStr=localStorage.getItem("ly");
	if(dataStr){
		dataObj=JSON.parse(dataStr);
		$scope.zhi=dataObj.info
	}else{
		localStorage.setItem("ly",'{"info":[]}');
	}
	    
	//提交    
	$scope.cc=function(){
		dataStr=localStorage.getItem("ly");
		dataObj=JSON.parse(dataStr);
		dataObj.info.push({"xm":$scope.xm,"je":$scope.je});
		$scope.zhi=dataObj.info;   
		dataStr=JSON.stringify(dataObj);
		localStorage.setItem("ly",dataStr)
		$(".input").val("")              
	}
	$scope.sc=function(index){
		dataObj=JSON.parse(dataStr);  
		dataObj.info.splice(index,1)
		$scope.zhi=dataObj.info
		dataStr=JSON.stringify(dataObj)
		localStorage.setItem("ly",dataStr)
	}
}])
mk.controller("dd",["$scope",function($scope){
	dataStr=localStorage.getItem("ly");
	if(dataStr){
		dataObj=JSON.parse(dataStr);
		$scope.zhi=dataObj.info
	}else{
		localStorage.setItem("ly",'{"info":[]}');
	}
	    
	//提交    
	$scope.cc=function(){
		dataStr=localStorage.getItem("ly");
		dataObj=JSON.parse(dataStr);
		dataObj.info.push({"xm":$scope.xm,"je":$scope.je});
		$scope.zhi=dataObj.info;   
		dataStr=JSON.stringify(dataObj);
		localStorage.setItem("ly",dataStr)
		$(".input").val("")              
	}
	$scope.sc=function(index){
		dataObj=JSON.parse(dataStr);  
		dataObj.info.splice(index,1)
		$scope.zhi=dataObj.info
		dataStr=JSON.stringify(dataObj)
		localStorage.setItem("ly",dataStr)
	}
}])